package openbang.common.vo;

/**
 * 用户状态定义 : 可用、待审状态（如：邮箱校验、手机校验、用户升级校验  @see BusinessEnum）、禁用、做废
 * 
 * @author aibo zeng
 *
 */

public enum StatusEnum {
	NORMAL (0,"可用状态"),
	DISABLE(10,"禁用状态"),
	PENDING_VERIFY(20,"待审状态"),
	DELETE(99,"作废状态");

	private Integer code;
	private String desc;
	
	private StatusEnum(Integer code,String desc) {
		this.code = code;
		this.desc = desc;
	}
	public int getCode() {
		return code;
	}
	public String getDesc(){
		return desc;
	}
	
	public static String getDesc(Integer code) {
		for(StatusEnum each : StatusEnum.values()) {
			if(each.getCode()==code)
				return each.getDesc();
		}		
		return "";
	}
}
